﻿Imports GT = Gadgeteer
Imports GTM = Gadgeteer.Modules
Imports Gadgeteer.Modules.GHIElectronics


Namespace Drawing
    Partial Public Class Program

        ' This is run when the mainboard is powered up or reset. 
        Public Sub ProgramStarted()
            '*******************************************************************************************
            ' Hardware modules added in the Program.gadgeteer designer view are used by typing 
            ' their name followed by a period, e.g.  button.  or  camera.
            '
            ' Many hardware modules generate useful events. To set up actions for those events, use the 
            ' left dropdown box at the top of this code editing window to choose a hardware module, then
            ' use the right dropdown box to choose the event - an event handler will be auto-generated.
            '*******************************************************************************************/

            ' Use Debug.Print to show messages in Visual Studio's "Output" window during debugging.
            Debug.Print("Program Started")
            'white background 
            display.SimpleGraphics.BackgroundColor = GT.Color.White
            'draw house, blue outline
            display.SimpleGraphics.DisplayRectangle(GT.Color.Blue, 4, GT.Color.White, 30, 30, 80, 80)
            ' draw roof - diagonal lines, blue colour
            display.SimpleGraphics.DisplayLine(GT.Color.Blue, 2, 30, 30, 70, 10) ' diagonal
            display.SimpleGraphics.DisplayLine(GT.Color.Blue, 2, 70, 10, 110, 30) ' diagonal

            'Window
            display.SimpleGraphics.DisplayRectangle(GT.Color.Red, 2, GT.Color.White, 40, 40, 15, 15)
            'door
            display.SimpleGraphics.DisplayRectangle(GT.Color.Yellow, 2, GT.Color.Magenta, 60, 70, 18, 40)

            'person
            display.SimpleGraphics.DisplayLine(GT.Color.Orange, 2, 91, 86, 91, 97) 'body
            display.SimpleGraphics.DisplayLine(GT.Color.Orange, 2, 91, 97, 86, 106) 'left leg
            display.SimpleGraphics.DisplayLine(GT.Color.Orange, 2, 91, 97, 96, 106) ' right leg
            display.SimpleGraphics.DisplayLine(GT.Color.Orange, 2, 84, 91, 98, 91) 'arms
            display.SimpleGraphics.DisplayRectangle(GT.Color.Orange, 1, GT.Color.Orange, 86, 76, 9, 9)



        End Sub

        ' If you want to do something periodically, declare a GT.Timer by uncommenting the below line
        '   and then use the dropdown boxes at the top of this window to generate a Tick event handler.
        ' Dim WithEvents timer As GT.Timer = new GT.Timer(1000)  ' every second (1000ms)

    End Class
End Namespace